<div class="st-cp-pg-blog"> 
    <div class="colEsquerda">
        <img class="imgAspas" src="<?php echo $this->urlbase.'/public/media/images/imagem_fixa.png'; ?>" alt="<?php echo $this->titulo; ?>"/>
        <div class="bordatriangular bt_top"></div>
        <img class="imgAspas blg_logo" src="<?php echo $this->urlbase.'/public/media/images/logo-blog.png'; ?>" alt="<?php echo $this->titulo; ?>"/>
        <div class="bordatriangular"></div>
        
        <div class="contato-blog">
            <p>
                <img src="<?php echo $this->urlbase.'/public/media/images/icone_endereco.png'; ?>" alt="endereço">
                <?php echo $this->parametros['PAR_END']; ?>
            </p>
            <br>
            <p>
                <img src="<?php echo $this->urlbase.'/public/media/images/icone-email.png'; ?>" alt="email">
                <?php echo $this->parametros['PAR_EML']; ?>
            </p>
            <br>
            <p>
                <img src="<?php echo $this->urlbase.'/public/media/images/icone_telefone.png'; ?>" alt="telefone">
                <?php echo $this->parametros['PAR_TEL']; ?>
            </p>  
        </div>
    </div>
    
    <div class="bar_lt">
        <div class="st_menu">
            <table cellpadding="4" style="border:1px solid #FFFFFF; border-spacing: 10px 10px;">
                <tr>
                    <td><a href="<?php echo $this->urlbase; ?>/">home</a></td>
                    <td><a href="<?php echo $this->urlbase; ?>/sobre">sobre a Day</a></td>
                </tr>
                <tr>
                    <td><a href="<?php echo $this->urlbase; ?>/dermato">o que &eacute; <br> dermato <br> funcional</a></td>
                    <td><a href="<?php echo $this->urlbase; ?>/procedimentos">procedimentos</a></td>
                </tr>
                <tr>
                    <td><a href="<?php echo $this->urlbase; ?>/pacotes">pacotes</a></td>
                    <td><a href="<?php echo $this->urlbase; ?>/contato">contato</a></td>
                </tr>
            </table>

            <?php echo $this->parametros['PAR_FACLKEBOX']; ?>     

            <h2 class="st_tl">Tags</h2>
            <p class="tag"><?php echo $this->tag; ?></p>

            <h2 class="st_tl">Meses</h2>

            <div class="meses">
                <ul>
                    <?php foreach($this->meses as $mes){ ?>
                    <li><a href="<?php echo $this->urlbase.'/blog/index/ano/'.$mes['ano'].'/mes/'.$mes['mes']; ?>"><?php echo ucfirst(Datetools::texto_Mes($mes['mes'])).'/'.$mes['ano'];?></a></li>     
                    <?php } ?>
                </ul>
            </div>
        </div>
    </div>
    
    <div class="cnt_lst_bg">
        <?php foreach($this->blog as $blog){ 
            $img = glob('public/upload/blog/'.$blog['BLO_ID'].'.*');
            if(isset($img[0]))$img = $img[0];
            else 'public/media/images/day-blog.png';
            
            $data_post = Datetools::semana(Datetools::diasemanaData($blog['BLO_DAT'])).', '.substr($blog['BLO_DAT'],8,2).' de '.Datetools::texto_Mes(substr($blog['BLO_DAT'],5,2)).' de '.substr($blog['BLO_DAT'],0,4).', às '.Datetools::hora_hm($blog['BLO_HOR']);
        ?>

        <div id="post_<?php echo $blog['BLO_ID']?>" class="cnt_it_bg">
            <div class="txt_bg">
                <?php if(strlen($img) > 5) {?>
                <img class="imgDay" src="<?php echo $this->urlbase.'/'.$img; ?>" alt="<?php echo $blog['BLO_NOM']; ?>" />
                <?php } ?>
                <div class="tl"><?php echo $blog['BLO_NOM']; ?></div>
                <div class="tl_dt">
                    <?php echo $data_post; ?>
                </div>
                <div class="txt">
                    <?php
                    $img2 = glob('public/upload/blog/'.$blog['BLO_ID'].'_txt.*');
                    if(isset($img2[0]))$img2 = $img2[0];

                    if(strlen($img2) > 5) {
                    ?>
                        <img class="imgTxt" src="<?php echo $this->urlbase.'/'.$img2; ?>" alt="<?php echo $blog['BLO_NOM']; ?>"/>
                    <?php } ?>
                    
                    <?php echo $blog['BLO_TXT']; ?>
                </div>
                
                <div class="fbComments">
                    <?php 
                        $url = $_SERVER['HTTP_HOST'].''.$this->urlbase.'/blog/index/id/'.$blog['BLO_ID'];
                        $pos = strpos($url, 'www.');
                        if ($pos === false) $url = 'http://www.'.$url;
                        else $url = 'http://'.$url; 
                        
                        $image = $_SERVER['HTTP_HOST'].''.$this->urlbase.'/'.$img;

                    ?>

                    <div id="fb-root"></div>
                    
                    <script>(function(d, s, id) {
                      var js, fjs = d.getElementsByTagName(s)[0];
                      if (d.getElementById(id)) return;
                      js = d.createElement(s); js.id = id;
                      js.src = "//connect.facebook.net/pt_BR/sdk.js#xfbml=1&appId=688243397900389&version=v2.0";
                      fjs.parentNode.insertBefore(js, fjs);
                    }(document, 'script', 'facebook-jssdk'));</script>
                    
                    <iframe src="//www.facebook.com/plugins/like.php?href=<?php echo urlencode($url); ?>&amp;width&amp;layout=standard&amp;action=like&amp;show_faces=false&amp;share=true&amp;height=35&amp;appId=688243397900389" scrolling="no" frameborder="0" style="border:none; overflow:hidden; width:100%; height:35px;" allowTransparency="true"></iframe>
                    
                    <div class="fb-comments" data-href="<?php echo $url; ?>" data-width="100%" data-numposts="5" data-colorscheme="light"></div>
                </div>
            </div>
        </div>
        <?php } ?>
        <?php echo $this->paginationControl($this->paginator, 'Sliding', 'pagination.phtml'); ?>
    </div>
</div>